package net.esj.auth.inst.struts2;

import net.esj.auth.Constants;
import net.esj.basic.core.engine.config.MelonConfig;
import net.esj.basic.plugins.view.FacadeAware;
import net.esj.basic.utils.Validators;
import net.esj.basic.view.PageAction;

public abstract class AbstractAuthAction<P, V> extends PageAction<P, V> implements Constants,FacadeAware{

	private String template;
	private String theme;
	private String namespace;
	
	public String getTemplate() {
		return template;
	}

	public void setTemplate(String template) {
		this.template = template;
	}

	public String getTheme() {
		return theme;
	}

	public void setTheme(String theme) {
		this.theme = theme;
	}

	public String getNamespace() {
		return namespace;
	}

	public void setNamespace(String namespace) {
		this.namespace = namespace;
	}



	@Override
	protected String[] getDefaultSources() {
		String str  = MelonConfig.getProperty(AUTH_DEFAULT_MESSAGE, null);
		if(Validators.isEmpty(str)){
			return null;
		}
		return new String[]{str};
	}
}
